package com.dl.mall.config;

import com.dl.mall.interceptor.InfoInterceptor;
import com.dl.mall.interceptor.JWTInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * 拦截器配置类
 * @author DL
 * @create 2022-03-13 18:26
 */
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {

    @Resource
    JWTInterceptor jwtInterceptor;

    @Resource
    InfoInterceptor infoInterceptor;

    //添加拦截器
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
/*
        registry.addInterceptor(infoInterceptor)
                .addPathPatterns("/**");*/
    }
}
